import http from "@/utils/http2.js";

/**
 * 获取分页查询结果
 * @returns data
 */
export async function getDepts(data) {
  let res = await http.post("/dept/query", data);
  if (res.code == 200) {
    return res;
  }
}
export function updateStatus(id, status) {
  let res = http.put("/dept/status?id=" + id + "&status=" + status);
  return res;
}
export function saveDept(data) {
  return http.post("/dept", data);
}
export function updateDept(data) {
  return http.put("/dept", data);
}
export function deleteDept(id) {
  return http.delete("/dept", id);
}
export function queryTree() {
  return http.get("/dept/queryTree");
}
